<!DOCTYPE html>
<html>
<head>
<title>编辑站点</title>
#include("../include/common.html")
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>编辑站点</h5>
            </div>
           <form id="inputForm" action="update" method="post">
           		<input type="hidden" name="id" value="#(site.id)">
	            <div class="ibox-content">
	                <div class="form-horizontal clearfix">
	                    <div class="form-group">
	                        <label class="col-sm-3 control-label">名称：</label>
	                        <div class="col-sm-3">
	                            <input placeholder="名称" class="form-control" type="text" name="name" value="#(site.id)">
	                        </div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-3 control-label">域名：</label>
	                        <div class="col-sm-3">
	                            <input placeholder="域名" class="form-control" type="text" name="domain" value="#(site.domain)">
	                        </div>
	                    </div>
	                    <div class="form-group">
                            <label class="col-sm-3 control-label">类型：</label>
                            <div class="col-sm-3">
                                #if(site.type==1) 新站点  #else if(site.type==2) 数据同其他站点 #end
                            </div>
                        </div>
                        #if(site.type==2)
                        <div class="form-group">
                            <label class="col-sm-3 control-label">数据同其他站点：</label>
                            <div class="col-sm-3">
                                #if(site.sameSite??) #(site.sameSite.name)  #else 无  #end
                            </div>
                        </div>
                        #end
	                </div>
	            </div>
	            <div class="modal-footer col-sm-3 col-sm-offset-2">
	                <button type="submit" class="btn btn-w-m btn-primary">确定</button>
	                <button type="button" class="btn btn-w-m btn-default" onclick="history.back(); return false;">取消</button>
	            </div>
            </form>
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
$().ready(function() {

	var $inputForm = $("#inputForm");
	
	// 表单验证
	$inputForm.validate({
		rules: {
			name: "required"
		}
	});

});
</script>
